package com.tang.lts.core.runner;

/**
 * @author Tang
 * @classname JobRunnerDelegate
 * @description [  ]
 * @date 2022/5/31 16:56
 */
public class JobRunnerDelegate implements Runnable{

    private JobRunner jobRunner;

    private RunnerCallback callback;

    public JobRunnerDelegate(JobRunner runner, RunnerCallback callback) {
        this.jobRunner = runner;
        this.callback = callback;
    }

    @Override
    public void run() {
        try {
            Result result = this.jobRunner.run();
        } catch (Throwable throwable) {
            throwable.printStackTrace();
        }
    }
}